package pers.lx.crm.dao.market;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import pers.lx.crm.entiy.market.MarketDO;

import java.util.List;

/**
 * Created by lxl on 2017/3/8.
 */
@Repository
public interface MarketDao {

    public void insertCustomerBusiness(MarketDO marketDO) ;

    @Select("select customer_business.id as id,customer_business.create_date as create_date,business.name as business_name,business.id as businessId,customer.name as customer_name,customer.id as customerId from customer_business,business,customer where customer_business.customer_id=customer.id and customer_business.business_id=business.id")
    public List<MarketDO> selectCustomerBusinessListPage(MarketDO marketDO) ;

    @Delete("delete from customer_business where id=#{id}")
    public void deleteCustomerBusiness(MarketDO marketDO) ;

}
